import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
const routes: Array<RouteRecordRaw> = [
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/loginView.vue')
  },
  {
    path: '/',
    name: 'Home',
    component: () => import('@/views/home.vue'),
    children:[
      {
        path: '/goodes',
        name: 'Goodes',
        meta:{
          isShow:true,
          title:"商品列表"
        },
        component: () => import('@/views/goodsView.vue')
      },
      {
        path: '/user',
        name: 'User',
        meta:{
          isShow:true,
          title:"用户列表"
        },
        component: () => import('@/views/userView.vue')
      }
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
